package at.ac.tuwien.ifs.calendit.basis.gui;

public class CalenditTableModel {
	private static int day;
	private static int month;
	private static int year;
	private static int last_change; //1... day, 2... month, 3... year
	
	public CalenditTableModel(){
		
	}
	
	public CalenditTableModel(int lc, int value){
		
		last_change = lc;
		if (last_change == 1) {
			setDay(value);
		//	currDate.DAY_OF_MONTH = value;
		} else if (last_change == 2){
			setMonth(value);
		//	currDate.MONTH = value;
		} else if (last_change == 3){
			setYear(value);
		//	currDate.YEAR = value;
		} else {
			//fehler ?
		}
	}
	
	public void setMonth(int value){
		month = value;
		last_change = 2;
	}
	
	public void setDay(int value){
		day = value;
		last_change = 1;
	}
	public void setYear(int value){
		year = value;
		last_change = 3;
	}
	
	public static int getLastCange(){
		return last_change;
	}
	
	public static int getDay(){
		return day;
	}
	
	public static int getMonth(){
		return month;
	}
	
	public static int getYear(){
		return year;
	}
}
